#include "stdio.h"

int main(int argc, char const *argv[]) {
  double fee, ele;
  scanf("%lf", &ele);
  if (ele >= 0 && ele <= 110) {
    fee = ele*0.5;
  }
  else if (ele <= 210) {
    fee = 55 + (ele - 110) * 0.55;
  }
  else {
    fee = 110 + (ele - 210) * 0.7;
  }
  printf("%.2f\n", fee);

  return 0;
}
